function tri_dof = get_tri_dof(dofs,tri)
    if(size(dofs,2)==2)  % using spline method or DG
        tri_dof = dofs(tri,1):dofs(tri,2);
    else         % using finite element method 
        tri_dof = dofs(tri,:);
    end